package teacher;
import secretary.defineSemester;
import basic.ClientConsole;

import com.sun.rowset.CachedRowSetImpl;

import flexibility.userData;

public class getFid {
	public defineSemester semester=new defineSemester();
	int currentSem;
	
	public CachedRowSetImpl getFID(ClientConsole teacherConnection,
			CachedRowSetImpl rs, userData T_Data,Integer myID,String s1){
		//s1=FileID
		
		T_Data.deleteAll();
		T_Data.addData(34);
		T_Data.addData(1);
		T_Data.addData(s1);
		teacherConnection.acceptMsg(T_Data);
        rs = teacherConnection.getResults();
		return rs;
		
	}
	public CachedRowSetImpl fileStudentID(ClientConsole teacherConnection,
			CachedRowSetImpl rs, userData T_Data,Integer myID,String sid,String aID){
		//s1=FileID
		getCoursesCurrSem gcc=new getCoursesCurrSem();
		currentSem=semester.identify(0, teacherConnection, rs);
		
		T_Data.deleteAll();
		T_Data.addData(39);
		T_Data.addData(1);
		T_Data.addData(sid);
		T_Data.addData(aID);
		T_Data.addData(currentSem);
		teacherConnection.acceptMsg(T_Data);
        rs = teacherConnection.getResults();
		return rs;
		
	}
	
	public CachedRowSetImpl fileFeedback(ClientConsole teacherConnection,
			CachedRowSetImpl rs, userData T_Data,Integer myID,String sid,String aID,int f){
		//s1=FileID
		
		T_Data.deleteAll();
		if(f==1){
			T_Data.addData(106);	
		}
		else{
			T_Data.addData(107);
		}
		T_Data.addData(1);
		T_Data.addData(sid);
		T_Data.addData(aID);
		teacherConnection.acceptMsg(T_Data);
        rs = teacherConnection.getResults();
		return rs;
		
	}
	

}


